package com.zipking.cloud.springbootmybatis.kafka;

import lombok.Getter;

@Getter
public enum MediaEnum {
    UNKNOWN("未知", 0,"unknown"),
    FIRST_TRANSFORM("firstTransform", 1,"firstTransform"),
    SECOND_TRANSFORM("secondTransform", 2,"secondTransform"),
    THIRD_TRANSFORM("thirdTransform", 3,"thirdTransform");
    private String name;
    private int code;
    private String alias;

    MediaEnum(String name, int code, String alias) {
        this.name = name;
        this.code = code;
        this.alias = alias;
    }

    public static MediaEnum create(String name) {
        for (MediaEnum media : values()) {
            if (media.name.equals(name)) {
                return media;
            }
        }
        return UNKNOWN;
    }
}